//
//  UILable+Extension.swift
//  weiboLQ
//
//  Created by 半缘君 on 15/12/7.
//  Copyright © 2015年 banyuanjun.cn. All rights reserved.
//

import UIKit

extension UILabel {
    
    convenience init(txt:String,txtFont:CGFloat = 14,txtColor:UIColor = UIColor.darkGrayColor(),alignment: NSTextAlignment =  NSTextAlignment.Center){
        self.init()
        text = txt
        font = UIFont.systemFontOfSize(txtFont)
        textColor = txtColor
        
        numberOfLines = 0
        textAlignment = alignment
        if textAlignment != NSTextAlignment.Center {
        preferredMaxLayoutWidth = UIScreen.mainScreen().bounds.width - CGFloat(LQHomeCellMargin * 2)
        }
    }
}
